package ch.zhaw.cctd.domain.creep;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import ch.zhaw.cctd.gui.MatchGUI;

/**
 * Speichert Informationen über einen Debuff auf einem Creep. Debuff sind
 * negative Effekte, zb. Verlangsamung oder Schaden über eine gewisse Zeit.
 * 
 * @author Rolf
 * 
 */
public class Debuff implements Serializable {

	/**
	 * Serializable ID
	 */
	private static final long serialVersionUID = -8868954711708233437L;
	/**
	 * Logger
	 */
	private static final Logger logger = LoggerFactory.getLogger(MatchGUI.class);
	// Debuff Infos
	private long timeoutTime = 0;
	private boolean multiple = false;

	// Creep Debuff Properties modifyers
	private List<String> removeAbilities = new ArrayList<String>();
	private List<String> addAbilities= new ArrayList<String>();

	// Movement
	private int modifyerSpeed = 0;

	/**
	 * for slowing the shootable
	 */
	public Debuff(int duration) {
		logger.trace("Debuff created");
		setTimeoutTime(Calendar.getInstance().getTimeInMillis() + duration);
	}
	
	/**
	 * for ability add/remove debuff
	 */
	public Debuff() {
	}

	/**
	 * TimeoutTime Setter and Getter
	 */
	public void setTimeoutTime(long duration) {
		this.timeoutTime = duration;
	}

	public long getTimeoutTime() {
		return timeoutTime;
	}

	/**
	 * Multiple Setter and Getter
	 */
	public void setMultiple(boolean multiple) {
		this.multiple = multiple;
	}

	public boolean isMultiple() {
		return multiple;
	}

	/**
	 * Remove Abilities Setter and Getter
	 */
	public void setRemoveAbilities(List<String> removeAbilities) {
		this.removeAbilities = removeAbilities;
	}

	public List<String> getRemoveAbilities() {
		return removeAbilities;
	}

	/**
	 * AddAbilities Setter and Getter
	 */
	public void setAddAbilities(List<String> addAbilities) {
		this.addAbilities = addAbilities;
	}

	public List<String> getAddAbilities() {
		return addAbilities;
	}

	/**
	 * ModifyerSpeed Setter and Getter
	 */
	public void setModifyerSpeed(int modifyerSpeed) {
		this.modifyerSpeed = modifyerSpeed;
	}

	public int getModifyerSpeed() {
		return modifyerSpeed;
	}

}
